<?php
/*
 * @Author: your name
 * @Date: 2020-10-28 17:27:34
 * @LastEditTime: 2020-10-29 10:08:29
 * @LastEditors: Please set LastEditors
 * @Description: 函谷盾模块路由
 * @FilePath: /special/route/module_hgshield.php
 */
//模块管理

Route::group('hgshield',  function () use ($route) {
    $route = $route . '.' . 'hgshield';
    //模块关系管理
    Route::group('relation',  function () use ($route) {
        $route = $route . '.' . 'HgshieldModuleRelation';
        //未添加netfilter模块主机列表
        Route::rule('notadded/host/list', $route . '/' . 'list');
        //主机添加模块
        Route::rule('add', $route . '/' . 'add');
        //主机删除模块
        Route::rule('delete', $route . '/' .  'del');
    });
});

    //官方规则组
    Route::rule('normalrule/group/:host_id/list', 'adminapiv3/NormalRuleGroup/list');//官方规则组列表
    Route::rule('normalrule/group/:host_id/open', 'adminapiv3/NormalRuleGroup/open');//启用
    Route::rule('normalrule/group/:host_id/close', 'adminapiv3/NormalRuleGroup/close');//停用


    //官方规则
    Route::rule('normalrule/:host_id/list/:group_id', 'adminapiv3/NormalRule/list');//列表
    Route::rule('normalrule/:host_id/open', 'adminapiv3/NormalRule/open');//启用
    Route::rule('normalrule/:host_id/close', 'adminapiv3/NormalRule/close');//停用
    Route::rule('normalrule/:host_id/setting', 'adminapiv3/NormalRule/setting');//配置

    //自定义规则
    Route::rule('ipsrule/:host_id/list', 'adminapiv3/IpsRule/list');//列表
    Route::rule('ipsrule/indexdata', 'adminapiv3/IpsRule/indexData');//列表数据
    Route::rule('ipsrule/:host_id/open', 'adminapiv3/IpsRule/open');//启用
    Route::rule('ipsrule/:host_id/close', 'adminapiv3/IpsRule/close');//停用
    Route::rule('ipsrule/:host_id/del', 'adminapiv3/IpsRule/del');//删除
    Route::rule('ipsrule/:host_id/clear', 'adminapiv3/IpsRule/clear');//清空
    Route::rule('ipsrule/:host_id/add', 'adminapiv3/IpsRule/add');//添加

    //网络日志
    Route::rule('networkattack/:host_id/list', 'adminapiv3/NetworkAttack/list');//列表
    Route::rule('networkattack/indexData', 'adminapiv3/NetworkAttack/indexData');//首页数据
    Route::rule('networkattack/:host_id/allowip', 'adminapiv3/NetworkAttack/allowIp');//设置白名单
    Route::rule('networkattack/:host_id/closeallowip', 'adminapiv3/NetworkAttack/closeAllowIp');//取消白名单
    Route::rule('networkattack/downloaddata', 'adminapiv3/NetworkAttack/downloaddata');//下载数据包
    Route::rule('networkattack/:host_id/close', 'adminapiv3/NetworkAttack/close');//停用规则
    Route::rule('networkattack/:host_id/open', 'adminapiv3/NetworkAttack/open');//开启规则

    //功能设置
    Route::rule('ips/config/:host_id/findData', 'adminapiv3/IpsConfig/findData');//获取配置
    Route::rule('ips/config/:host_id/modify', 'adminapiv3/IpsConfig/modify');//配置

    //原始规则
    Route::rule('ips/originalrlue/:host_id/list', 'adminapiv3/IpsOriginalRule/list');//原始规则列表
    Route::rule('ips/originalrlue/:host_id/openmonitor', 'adminapiv3/IpsOriginalRule/openMonitor');//原始规则监控
    Route::rule('ips/originalrlue/:host_id/closemonitor', 'adminapiv3/IpsOriginalRule/closeMonitor');//原始规则关闭监控
    Route::rule('ips/originalrlue/:host_id/del', 'adminapiv3/IpsOriginalRule/del');//原始规则删除
    Route::rule('ips/originalrlue/:host_id/importRule', 'adminapiv3/IpsOriginalRule/importRule');//转换并上传客户端防火墙规则